const icons = {}
let requireComponent = require.context(
    './svgs', // 在当前目录下查找
    false, // 不遍历子文件夹
    /\.svg$/ // 正则匹配 以 .vue结尾的文件
)
requireComponent.keys().forEach(fileName => {
    let comp = requireComponent(fileName)
    icons[fileName.replace(/^\.\/(.*)\.\w+$/, '$1')] = comp.default
})
export default icons;
export { icons };

/*
import Vue from "vue";
import MessageSvg from '../../assets/svg/a.svg';
//import Vue from "vue/types/vue"; // path to your '*.svg' file.

/!*
export default (Vue)=>{
    Vue.component("MessageSvg",{
        data: function () {
            return {
                MessageSvg
            }
        },
        template: '<a-icon :component="MessageSvg" />'
    });
}*!/
const icons = {
    // ResponsiveGridLayout,
    MessageSvg
}

// module.exports = VueGridLayout;

Object.keys(icons).forEach(name => {
    Vue.component(name, icons[name]);
});

export default icons;
/!*export { MessageSvg };*!/
*/
